package com.snailhd.common.exception;

import com.snailhd.common.entity.SubMsgResult;
import lombok.Data;


@Data
public class BaseException extends RuntimeException {

    protected String errorCode;
    protected String errorMsg;

    public BaseException(){
        super();
    }


    public BaseException(SubMsgResult subMsgResult){
        super();
        this.errorCode = subMsgResult.getSubCode();
        this.errorMsg = subMsgResult.getSubMsg();
    }

    public BaseException(String errorCode, String errorMsg) {
        super();
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

}
